package com.bsc.rtc.lib.libraries.dagger;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.bsc.rtc.lib.libraries.R;
import com.bsc.rtc.lib.libraries.dagger.component.DaggerICarComnent;
import com.bsc.rtc.lib.libraries.dagger.entity.Car;
import com.bsc.rtc.lib.libraries.dagger.entity.Man;

import javax.inject.Inject;


public class DaggerDemoActivity extends AppCompatActivity {
    @Inject
    Man man;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dagger_demo);
        DaggerICarComnent.builder().build().inject(this);
        init();
    }

    private void init() {
        man.drive();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.i("zzw", "ondestory");
    }
}
